POV-Ray : Newsgroups : povray.general : Isosurfaces in v3.5 and how to convert them to heightfields? : Isosurfaces in v3.5 and how to convert them to heightfields? Server Time
31 Jul 2024 10:20:41 EDT (-0400)
  Isosurfaces in v3.5 and how to convert them to heightfields?  
From: Hugo
Date: 9 Oct 2001 11:15:35
Message: <3bc31497@news.povray.org>
Hello folks,

I'm no expert in isosurfaces, but I suspect POV 3.5 to be less powerful than
MegaPOV because it doesn't have the "method" keyword.. I liked method 1 and
now I am forced to use what appears to be method 2.. So I must specify a
max_gradient and in most cases I a gradient of over 100 for my shapes to
render properly.. This is much slower than method 1..

I don't know how to solve that.. But sometimes it would also be great to
convert ISO's to bitmaps so they can be used as heightfields.. I read the
documentation for POV 3.5 and I only see the possibility of making 255
slices of an isosurface, each of them with a "pigment object" that is either
on/off... Remember the "pigment { object { ...." keywords? Then I put these
255 pigments on 255 boxes, all of them with a transparant white color. Then
the camera + light in front of it.. If it sounds confusing, maybe this code
explains my idea, although you can't render anything with it:


#declare Steps=255;  // Amount of slices
#declare Start=-.3;  // Z position to start
#declare End=.25;    // Z position to end
#declare Next=(End-Start)/Steps; // The next step pre-calculated.

#while (Start<End)
    #declare ISO=isosurface { function { .... }
        contained_by { box
{ <-1,-1,Start-.0001>,<1,1.25,Start+Next+.0001> } } }
    box { <-1,-1,Start>,<1,1.25,Start+Next>
    pigment { object { ISO color rgbt <0,0,0,1> color rgbt
<1,1,1,1/Steps> } } }
    #declare Start=Start+Next;
    #end


But I mostly get a black result. The form is only recognizeable if I use 5
or 6 steps istead of 255.. What's wrong, and are there more clever ways? I
think MegaPOV could output a density file.

Regards,
Hugo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.